-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show active members in the Organization Admin #704
Conversation
2624772
to
0887edf
Compare
a21efc8
to
575f4d2
Compare
key=lambda obj: (obj.jobs_count, obj.deltas_count), | ||
reverse=True, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is sure potential to optimize the queries, currently is doing 45 queries for 2 active users, 41 queries for 1 active user. So it might get slow with many active users ... . Probably with some prefetch_related magic could be improved. Question is how much more effort want to put into optimizing this.
Decided to simplify and only show a list of Users. Dropping the jobs and deltas count per user. Will therefore force push onto this PR. Will keep the current state on this branch https://github.com/opengisch/qfieldcloud/tree/QF-2604_org_active_users_job_deltas_count_detail_admin if we need the funcionality later |
@faebebin I assume it is not ready yet? |
44a410f
to
7f4c68f
Compare
This reverts commit 5f03d47.
d7947ec
to
cc0f315
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nice and simple. Please add the users on a new line makes things easier to read.
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Shows the active members, that have created a Job or a Delta for the Organization during the running stripe billing period in the admin.
The list of users in the detail view
(if no active members)
Dropped the active members count in the list_view - it would slow down too much:
It adds 4 Queries per organization. Without it is 6 Queries in total.
now:
before: